<%@ page language="java" pageEncoding="UTF-8"%><!DOCTYPE html><%@ taglib uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"%>
<html>
<head>
<title>个人中心 </title>
<jsp:include page="/head.jsp" />
<link rel="stylesheet" type="text/css" href="assets/css/main.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-table/bootstrap-table.min.css"" />
<script src="assets/plugins/bootstrap-table/bootstrap-table.min.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	
	<div style="background-color: rgb(233, 236, 239);">
		<div class="container-md">
			<nav aria-label="breadcrumb">
				<ol class="breadcrumb">
					<li class="breadcrumb-item"><a href="./">首页</a></li>
					<li class="breadcrumb-item ">个人中心</li>
					<li class="breadcrumb-item active">修改个人头像</li>
				</ol>
			</nav>
		</div>
	</div>
	<div class="container-md">
		<div class="row">
			<div class="col-sm-3 left-menu">
				<div class="card bg-primary">
					<div class="card-header text-white"><i class="fa fa-list mr-2"></i>个人中心</div>
					<div class="list-group">
						<a href="usercenter/user1.jsp" class="list-group-item list-group-item-action }">
							修改个人信息</a> 
						<a href="usercenter/user2.jsp" class="list-group-item list-group-item-actionactive">
							修改个人头像</a> 
						<a href="usercenter/user3.jsp" class="list-group-item list-group-item-action">
							修改登录密码</a>
						<a href="usercenter/user4.jsp" class="list-group-item list-group-item-action${param.action=='my-4'?' active':'' }">
							收货地址管理</a> 
					</div>
				</div>
				<div class="card bg-primary mt-2">
					<div class="card-header text-white"><i class="fa fa-list mr-2"></i>我的订单</div>
					<div class="list-group">
						<a href="usercenter/order1.jsp" class="list-group-item list-group-item-action${param.action=='o-0'?' active':'' }">
							待付款</a>
						<a href="usercenter/order2.jsp" class="list-group-item list-group-item-action${param.action=='o-1'?' active':'' }">
							待发货</a>
						<a href="usercenter/order3.jsp" class="list-group-item list-group-item-action${param.action=='o-2'?' active':'' }">
							待收货</a>
						<a href="usercenter/order4.jsp" class="list-group-item list-group-item-action${param.action=='o-3'?' active':'' }">
							评价/完成</a>
						
					</div>
				</div>
				
				
			 </div>
			<div class="col-sm-9" style="border: solid rgba(0, 0, 0, 0.1) 1px; box-shadow:0 0 .3rem rgba(0, 0, 0, 0.3); border-radius:5px; padding: 10px; z-index:1;">
				
				
				
				<!--   主内容写这里！！！！  -->
				<h2>修改头像：</h2>
				<hr />
				
				<% 
				  
				
				%>
				<div style="margin:auto auto">
					<form action="updateLog.let" method="post" enctype="multipart/form-data" id="form">
						<img alt="" src="${user.hdlUserLog } " id="oldImg"
							style="width: 50px; height: 50px; border-radius: 50%;">

						<h3>修改头像</h3>
						<input type="file" required="required" id="log" name="hdlUserLog" /> <img alt=""
							src="" id="img"
							style="width: 50px; height: 50px; border-radius: 50%;">
						<button id="btn">修改</button>
					</form>
				</div>





			</div> 
		</div>
	</div> 
	<script type="text/javascript" src="usercenter/order.js"></script>

</body>
</html>
<script>
//选择头像
	var oFile = document.querySelector("#log");
	
	var oImg = document.querySelector('#img');
	oFile.addEventListener("change",function(){
	    let f = oFile.files[0];
	    if(f==undefined){
	        oImg.src='img/1.jpg';
	    }else{
	        let reader = new FileReader();
	        reader.addEventListener("load",function () {
	            oImg.src= reader.result;
	        })
	        reader.readAsDataURL(f);
	    }
	     });
	
	
</script>
